/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-03-27
 * Time: 16:02
 */


//Duck必须实现Swimmable、Flyable和DuckAbility的所有方法。
public class Duck implements DuckAbility {
    @Override
    public void swim() {
        System.out.println("鸭子游泳...");
    }

    @Override
    public void fly() {
        System.out.println("鸭子飞...");
    }

    @Override
    public void quack() {
        System.out.println("鸭子嘎嘎声...");
    }
}